﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace QLibrary.Helper
{
    public static class ObservableCollectionHelper
    {
        public static ObservableCollection<T> ToObservableCollection<T>(this List<T> list)
        {
            ObservableCollection<T> observables = new ObservableCollection<T>();
            foreach (T current in list)
            {
                observables.Add(current);
            }
            return observables;
        }

        public static ObservableCollection<T> ToObservableCollection<T>(this List<T> list, ObservableCollection<T> observables)
        {
            foreach (T current in list)
            {
                observables.Add(current);
            }
            return observables;
        }
    }
}
